package com.ruyuan.eshop.construction.converter;

import com.ruyuan.eshop.construction.domain.dto.BrandInfoDTO;
import com.ruyuan.eshop.construction.domain.entity.AttributeKeyDO;
import com.ruyuan.eshop.construction.domain.entity.AttributeValueDO;
import com.ruyuan.eshop.construction.domain.entity.BrandInfoDO;
import com.ruyuan.eshop.construction.domain.request.AttributeRequest;
import com.ruyuan.eshop.construction.domain.request.BrandRequest;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

/**
 * 品类相关对象克隆
 * @author zhonghuashishan
 * @version 1.0
 */
@Mapper(componentModel = "spring")
public interface BrandConverter {

    /**
     * 对象克隆
     * @param attributeKeyRequest
     * @return
     */
    @Mapping(target = "updateUser", source = "operateUser")
    BrandInfoDO converterDO(BrandRequest attributeKeyRequest);

    /**
     * 对象克隆
     * @param brandInfoDO
     * @return
     */
    BrandInfoDTO converterDTO(BrandInfoDO brandInfoDO);

    /**
     * 对象克隆
     * @param brandInfoDOS
     * @return
     */
    List<BrandInfoDTO> converterDTOList(List<BrandInfoDO> brandInfoDOS);
}
